// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsISystemProxySettings.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// This interface allows the proxy code to use platform-specific proxy
    /// settings when the proxy preference is set to "automatic discovery". This service
    /// acts like a PAC parser to netwerk, but it will actually read the system settings and
    /// either return the proper proxy data from the autoconfig URL specified in the system proxy,
    /// or generate proxy data based on the system's manual proxy settings.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("971591cd-277e-409a-bbf6-0a79879cd307")]
	public interface nsISystemProxySettings
	{
		
		/// <summary>
        /// Whether or not it is appropriate to execute getProxyForURI off the main thread.
        /// If that method can block (e.g. for WPAD as windows does) then it must be
        /// not mainThreadOnly to avoid creating main thread jank. The main thread only option is
        /// provided for implementations that do not block but use other main thread only
        /// functions such as dbus.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetMainThreadOnlyAttribute();
		
		/// <summary>
        /// If non-empty, use this PAC file. If empty, call getProxyForURI instead.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetPACURIAttribute([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase aPACURI);
		
		/// <summary>
        /// See ProxyAutoConfig::getProxyForURI; this function behaves similarly except
        /// a more relaxed return string is allowed that includes full urls instead of just
        /// host:port syntax. e.g. "PROXY http://www.foo.com:8080" instead of
        /// "PROXY www.foo.com:8080"
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetProxyForURI([MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase testSpec, [MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase testScheme, [MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase testHost, int testPort, [MarshalAs(UnmanagedType.LPStruct)] nsAUTF8StringBase retval);
	}
}
